package Shangji1;

/**
 * 除法操作
 */
public class DivideOperation implements Operation {
    @Override
    public double calculate(double num1, double num2) {
        if (num2 == 0) {
            throw new ArithmeticException("除数不能为零");
        }
        return num1 / num2;
    }
}